home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- import re
- from checkbox.lib.cache import cache
- from checkbox.properties import String
- from checkbox.registries.command import CommandRegistry
-
- class DpkgRegistry(CommandRegistry):
- '''Registry for dpkg information.
-
- For the moment, this registry only contains items for the version
- and architecture as returned by the dpkg command.
- '''
- command = String(default = 'dpkg --version')
-
- def items(self):
- items = []
- match = re.search('([\\d\\.]+) \\((.*)\\)', str(self))
- if match:
- items.append(('version', match.group(1)))
- items.append(('architecture', match.group(2)))
-
- return items
-
- items = cache(items)
-
- factory = DpkgRegistry
-